
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE [dbo].[HistoryInsert]
	@Id INT OUTPUT,
	@UserId INT,
	@Action VARBINARY(MAX),
	@Description VARBINARY(MAX)
AS
BEGIN
	
	INSERT INTO HistoryRecord
		(UserId, Action, Description, DateCreated, Deleted)
	VALUES 
		(@UserId, @Action, @Description, GETDATE(), 0);
	
	SET @Id = SCOPE_IDENTITY();
	
END
GO
